public class Test {
    public static void main(String[] args) {
        // 创建教师（先不关联课程，避免循环依赖）
        Teacher teacher1 = new Teacher("T001", "张老师", "男", null);
        Teacher teacher2 = new Teacher("T002", "李老师", "女", null);

        // 创建课程并关联教师
        Course course1 = new Course("C001", "Java 编程", "A101", "周一 8:00-10:00", teacher1);
        Course course2 = new Course("C002", "数据结构", "B201", "周三 14:00-16:00", teacher2);

        // 教师关联课程
        teacher1.setCourse(course1);
        teacher2.setCourse(course2);

        // 创建学生
        Student student1 = new Student("S001", "小明", "男");
        Student student2 = new Student("S002", "小红", "女");

        // 模拟选课、退课、打印课表
        student1.selectCourse(course1);
        student2.selectCourse(course2);
        student1.dropCourse();
        student1.printCourseSchedule();
        student2.printCourseSchedule();
    }
}